// components/orderUserInfo/orderUserInfo.js
Component({
    /**
   * 组件的属性列表
   */
    options: {
        addGlobalClass: true
    },
    properties: {
        leaderInfoProper: {
            type: JSON,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    leaderInfo: newVal
                });
            }
        },
        mainColor: {
            type: JSON,
            observer(newVal, oldVal, changPath) {
                let that = this;
                var mainColor = that.data.mainColor;
                that.setData({
                    mainColor: mainColor
                });
            }
        },
        receiverInfoProper: {
            type: JSON,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    receiverInfo: newVal
                });
            }
        },
        userInfoProper: {
            type: JSON,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    userInfo: newVal
                });
            }
        },
        chooseType: {
            type: JSON,
            observer(newVal, oldVal, changePath) {
                console.log("choose_type=" + newVal);
                this.setData({
                    choose_type: newVal
                });
            }
        },
        expressNum: {
            type: JSON,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    express_num: newVal
                });
            }
        },
        platNum: {
            type: JSON,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    plat_num: newVal
                });
            }
        },
        leaderAddressOn: {
            type: JSON,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    leader_address_on: newVal
                });
            }
        }
    },
    /**
   * 组件的初始数据
   */
    data: {
        leaderInfo: "",
        receiverInfo: ""
    },
    /**
   * 组件的方法列表
   */
    methods: {
        leaderChange() {
            this.triggerEvent("leaderchange", {}, {});
        },
        recordValueInfo(e) {
            let info = {
                key: e.currentTarget.dataset.name,
                value: e.detail.value
            };
            this.triggerEvent("recordValueInfo", info);
        }
    }
});